/* 伯乐智能HR - Living Workspace 样式表 */
/* 架构风格与JH子系统保持一致 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 主题变量 - 与JH风格保持一致 */
:root {
    /* 浅色主题 */
    --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-form: #ffffff;
    --bg-input: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: rgba(255, 255, 255, 0.2);
    --border-light: #e0e0e0;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 30px rgba(102, 126, 234, 0.3);
    
    /* 品牌颜色 */
    --primary-color: #667eea;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
}

/* 深色主题 */
[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    --bg-secondary: #2c3e50;
    --bg-card: #34495e;
    --bg-form: #34495e;
    --bg-input: #455a64;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: #444444;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 5px 30px rgba(52, 152, 219, 0.4);
}

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    transition: all 0.3s ease;
    overflow-x: hidden;
}

/* Living Workspace 布局 */
.living-workspace {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 顶部导航栏 */
.workspace-header {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.title {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    font-size: 2rem;
}

.subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.8;
    margin-left: 0.5rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 0;
    overflow: hidden;
}

/* 左侧候选人工作台 */
.candidate-workbench {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    width: 380px;
    min-width: 350px;
    overflow-y: auto; /* 添加垂直滚动条 */
    max-height: 100vh; /* 限制最大高度 */
}

.candidate-workbench.collapsed {
    margin-left: -300px;
}

.workbench-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.workbench-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.workbench-title h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workbench-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.workbench-controls .btn {
    white-space: nowrap;
}

.workbench-controls .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.workbench-controls .btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.workbench-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.candidate-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* 中心对话区域 */
.conversation-core {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 欢迎消息 */
.welcome-message {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.welcome-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem auto;
}

.welcome-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    text-align: left;
    margin: 1rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.feature-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.feature-list i {
    color: var(--primary-color);
    width: 16px;
}

.start-hint {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.8rem;
    border-radius: 8px;
    font-style: italic;
    color: var(--primary-color);
    margin-top: 1rem;
}

/* 消息样式 (V2 - 使用 margin 对齐，更稳定) */
.message-wrapper {
    /* 这个容器现在只负责间距，对齐由内部 .message 元素处理 */
    display: flex; /* 保留 flex 以便内部元素可以使用 auto margin */
    width: 100%;
    margin-bottom: 1rem;
}

/* .user-message-wrapper 和 .ai-message-wrapper 类现在只作为标识符，不直接控制对齐 */

.message {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    max-width: 80%;
}

.user-message {
    flex-direction: row-reverse;
    margin-left: auto; /* 关键：将消息推到右边 */
}

.ai-message {
    flex-direction: row;
    margin-right: auto; /* 关键：将消息推到左边 */
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.user-avatar {
    background: var(--info-color);
}

.ai-avatar {
    background: var(--primary-color);
}

.message-content {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex: 1;
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
}

.message-text {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.message-time {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* 加载状态 */
.loading-state {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
}

.loading-spinner i {
    color: var(--primary-color);
}

/* 输入区域 */
.chat-input-area {
    border-top: 1px solid var(--border-light);
    padding: 1rem;
    background: var(--bg-card);
}

.quick-suggestions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.suggestion-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.8rem;
}

.chat-input {
    flex: 1;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text-primary);
    resize: vertical;
    min-height: 48px;
    max-height: 120px;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 右侧深度信息面板 */
.deep-info-panel {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    width: 380px;
    min-width: 350px;
    overflow-y: auto; /* 添加垂直滚动条 */
    max-height: 100vh; /* 限制最大高度 */
}

.deep-info-panel.collapsed {
    margin-right: -350px;
}

.panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
}

/* 无选择状态 */
.no-selection {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.no-selection-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 候选人详情 */
.candidate-details {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Tab导航 */
.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-card);
}

.tab-btn {
    flex: 1;
    padding: 1rem 0.5rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Tab内容 */
.tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-pane {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: none;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
}

/* 岗位需求卡片 */
.job-requirement-card {
    background: var(--bg-card);
    border-radius: 12px;
    margin: 1rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-color);
    overflow: hidden;
}

.job-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), #5a6fd8);
    color: white;
}

.job-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.job-info {
    flex: 1;
}

.job-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: white;
}

.job-company {
    font-size: 0.9rem;
    opacity: 0.9;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    display: inline-block;
}

/* 候选人状态颜色 */
.status-badge.status-active {
    background: var(--success-color);
}

.status-badge.status-pending {
    background: var(--warning-color);
}

.status-badge.status-rejected {
    background: var(--danger-color);
}

.status-badge.status-interview {
    background: var(--primary-color);
}

.status-badge.status-hired {
    background: #10b981;
}

.status-badge.status-unknown {
    background: #6b7280;
}

.status-badge.urgent {
    background: var(--danger-color);
    color: white;
}

.job-details {
    padding: 1rem;
}

.job-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.required-skills {
    margin-bottom: 1rem;
}

.required-skills h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.recruitment-stats {
    display: flex;
    justify-content: space-around;
    padding: 0.8rem 0;
    border-top: 1px solid var(--border-light);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.skill-tag.loading {
    background: var(--border-light);
    color: var(--text-muted);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 候选人卡片 */
.candidate-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.candidate-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.candidate-card.selected {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.candidate-status {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
}

.candidate-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 600;
}

.candidate-info {
    flex: 1;
}

.candidate-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.candidate-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.match-score {
    text-align: center;
}

.score-badge {
    background: var(--success-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-content {
    margin-bottom: 1rem;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.8rem;
}

.skill-tag {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.more-skills {
    background: var(--border-light);
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.candidate-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.meta-item i {
    width: 12px;
    opacity: 0.7;
}

/* 按钮样式 - 与JH保持一致 */
.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--border-light);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-icon {
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    justify-content: center;
}

/* 发送按钮 */
.send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 表单元素 */
.filter-select, .sort-select {
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

/* 分析相关样式 */
.analysis-section {
    margin-bottom: 1.5rem;
}

.analysis-section h4 {
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
}

.score-display {
    text-align: center;
    margin-bottom: 1rem;
}

.score-circle {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.analysis-placeholder {
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
}

.analysis-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

/* 简历相关样式 */
.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.resume-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-input {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 150px;
}

.resume-content {
    flex: 1;
    overflow-y: auto;
}

.resume-text {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* 交互笔记样式 */
.notes-section {
    margin-bottom: 1.5rem;
}

.note-input-area {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.note-input {
    min-height: 80px;
    padding: 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
}

.timeline-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.timeline {
    border-left: 2px solid var(--border-light);
    padding-left: 1rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 1rem;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0.2rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.timeline-content {
    background: var(--bg-card);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.timeline-header h5 {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
}

.timeline-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.timeline-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.timeline-placeholder {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--info-color);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.notification-success {
    border-left-color: var(--success-color);
}

.notification-error {
    border-left-color: var(--danger-color);
}

.notification-warning {
    border-left-color: var(--warning-color);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.loading-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-hover);
}

.loading-spinner {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 280px 1fr 320px;
    }
}

@media (max-width: 768px) {
    .workspace-header {
        padding: 1rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        display: none;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .candidate-workbench,
    .deep-info-panel {
        position: fixed;
        top: 70px;
        height: calc(100vh - 70px);
        z-index: 1000;
        background: var(--bg-secondary);
        box-shadow: var(--shadow-hover);
    }
    
    .candidate-workbench {
        left: 0;
        width: 300px;
        transform: translateX(-100%);
    }
    
    .candidate-workbench.show {
        transform: translateX(0);
    }
    
    .deep-info-panel {
        right: 0;
        width: 320px;
        transform: translateX(100%);
    }
    
    .deep-info-panel.show {
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    .candidate-workbench,
    .deep-info-panel {
        width: 100%;
    }
    
    .quick-suggestions {
        display: none;
    }
    
    .input-wrapper {
        gap: 0.5rem;
    }
    
    .send-btn {
        width: 40px;
        height: 40px;
    }
}

/* ==================== 实时状态时间线样式 ==================== */

.agent-status-timeline {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin: 1rem 0;
    padding: 0;
    box-shadow: var(--shadow);
    animation: slideInUp 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.timeline-header {
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    position: relative;
}

.close-timeline-btn {
    position: absolute;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.close-timeline-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.timeline-content {
    padding: 1rem;
    min-height: 120px;
    position: relative;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1rem;
    opacity: 0;
    animation: fadeInLeft 0.5s ease-out forwards;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item.active {
    animation: pulseHighlight 1s ease-in-out infinite;
}

.timeline-item.completed {
    opacity: 0.8;
}

.timeline-connector {
    position: absolute;
    left: 20px;
    top: 32px;
    width: 2px;
    height: calc(100% - 16px);
    background: linear-gradient(to bottom, 
        var(--primary-color) 0%, 
        var(--border-light) 100%
    );
}

.timeline-item:last-child .timeline-connector {
    display: none;
}

.stage-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-right: 1rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.stage-icon.waiting {
    background: #f8f9fa;
    color: var(--text-muted);
    border: 2px solid var(--border-light);
}

.stage-icon.thinking {
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
    color: white;
    animation: rotateThinking 2s linear infinite;
    box-shadow: 0 0 12px rgba(243, 156, 18, 0.4);
}

.stage-icon.executing {
    background: linear-gradient(135deg, var(--info-color), #2980b9);
    color: white;
    animation: bounceExecuting 1.5s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(52, 152, 219, 0.4);
}

.stage-icon.completed {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
    box-shadow: 0 0 12px rgba(39, 174, 96, 0.4);
}

.stage-icon.error {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
    color: white;
    animation: shakeError 0.5s ease-in-out;
}

.stage-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stage-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.stage-message {
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.9;
}

.stage-timestamp {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-family: 'Consolas', 'Monaco', monospace;
}

.timeline-progress {
    height: 4px;
    background: var(--border-light);
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--primary-color) 0%, 
        #764ba2 100%
    );
    transition: width 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: moveProgress 1s linear infinite;
}

/* 动画定义 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseHighlight {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0);
    }
}

@keyframes rotateThinking {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounceExecuting {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
}

@keyframes shakeError {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

@keyframes moveProgress {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 20px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .timeline-content {
        padding: 0.75rem;
    }
    
    .stage-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .stage-name {
        font-size: 0.85rem;
    }
    
    .stage-message {
        font-size: 0.75rem;
    }
    
    .timeline-connector {
        left: 15px;
    }
}
/* 面试题模态框样式 */
.interview-modal .modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.interview-info {
    background: var(--surface-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.interview-info p {
    margin: 5px 0;
    color: var(--text-muted);
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.question-item {
    background: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.question-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.question-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.question-item p {
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .interview-modal .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .question-item {
        padding: 15px;
    }
}

/* ==================== Markdown 渲染样式 ==================== */

.message-content h1, 
.message-content h2, 
.message-content h3, 
.message-content h4, 
.message-content h5, 
.message-content h6 {
    margin: 0.8em 0 0.4em 0;
    font-weight: 600;
    line-height: 1.3;
}

.message-content h1 { 
    font-size: 1.6em; 
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.3em;
}

.message-content h2 { 
    font-size: 1.4em; 
    color: var(--text-primary);
}

.message-content h3 { 
    font-size: 1.2em; 
    color: var(--text-primary);
}

.message-content h4,
.message-content h5,
.message-content h6 { 
    font-size: 1.1em; 
    color: var(--text-primary);
}

.message-content p {
    margin: 0.6em 0;
    line-height: 1.6;
    color: inherit;
}

.message-content code {
    background: rgba(102, 126, 234, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
    font-weight: 500;
}

.user-message .message-content code {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.message-content pre {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1em;
    margin: 1em 0;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-message .message-content pre {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.message-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    border-radius: 0;
}

.message-content ul, 
.message-content ol {
    margin: 0.8em 0;
    padding-left: 2em;
}

.message-content li {
    margin: 0.4em 0;
    line-height: 1.5;
}

.message-content ul li {
    list-style-type: disc;
}

.message-content ol li {
    list-style-type: decimal;
}

.message-content li::marker {
    color: var(--primary-color);
}

.message-content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 1em 0;
    padding: 0.8em 1.2em;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    position: relative;
}

.user-message .message-content blockquote {
    border-left-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.message-content blockquote::before {
    content: '"';
    font-size: 3em;
    color: var(--primary-color);
    position: absolute;
    top: -0.2em;
    left: 0.2em;
    opacity: 0.3;
    font-family: serif;
}

.message-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    font-size: 0.9em;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message-content th, 
.message-content td {
    border: 1px solid var(--border-light);
    padding: 0.8em 1em;
    text-align: left;
}

.message-content th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.message-content tr:nth-child(even) {
    background: rgba(102, 126, 234, 0.03);
}

.message-content tr:hover {
    background: rgba(102, 126, 234, 0.08);
}

.user-message .message-content table {
    border-color: rgba(255, 255, 255, 0.2);
}

.user-message .message-content th {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-message .message-content td {
    border-color: rgba(255, 255, 255, 0.2);
}

.message-content strong, 
.message-content b {
    font-weight: 700;
    color: inherit;
}

.message-content em, 
.message-content i {
    font-style: italic;
}

.message-content hr {
    border: none;
    border-top: 2px solid var(--border-light);
    margin: 1.5em 0;
    border-radius: 1px;
}

.user-message .message-content hr {
    border-top-color: rgba(255, 255, 255, 0.3);
}

.message-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.message-content a:hover {
    border-bottom-color: var(--primary-color);
    opacity: 0.8;
}

.user-message .message-content a {
    color: rgba(255, 255, 255, 0.9);
}

.user-message .message-content a:hover {
    border-bottom-color: rgba(255, 255, 255, 0.7);
}

/* 特殊markdown元素 */
.message-content del {
    text-decoration: line-through;
    opacity: 0.7;
}

.message-content mark {
    background: rgba(255, 235, 59, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
}

.message-content sup {
    font-size: 0.75em;
    vertical-align: super;
}

.message-content sub {
    font-size: 0.75em;
    vertical-align: sub;
}

/* 代码块语法高亮提示 */
.message-content pre[class*="language-"] {
    position: relative;
}

.message-content pre[class*="language-"]::before {
    content: attr(class);
    position: absolute;
    top: 0.5em;
    right: 0.8em;
    font-size: 0.7em;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

/* 任务列表样式 */
.message-content input[type="checkbox"] {
    margin-right: 0.5em;
    transform: scale(1.2);
}

.message-content li input[type="checkbox"] {
    margin-left: -1.5em;
    margin-right: 0.8em;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .message-content h1 { font-size: 1.4em; }
    .message-content h2 { font-size: 1.2em; }
    .message-content h3 { font-size: 1.1em; }
    
    .message-content pre {
        padding: 0.8em;
        font-size: 0.85em;
    }
    
    .message-content table {
        font-size: 0.8em;
    }
    
    .message-content th,
    .message-content td {
        padding: 0.6em 0.8em;
    }
}

/* 深色主题下的markdown调整 */
[data-theme="dark"] .message-content pre {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .message-content blockquote {
    background: rgba(102, 126, 234, 0.1);
}

[data-theme="dark"] .message-content table {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ===========================================
   笔记功能样式
   =========================================== */
.notes-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.notes-section h4 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.note-input-area {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.note-input {
    flex: 1;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    background: white;
}

.note-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.notes-display-area {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.notes-display-area h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.notes-content {
    max-height: 300px;
    overflow-y: auto;
}

.note-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 4px solid #007bff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.note-text {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.note-time {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.no-notes {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* ===========================================
   通知样式
   =========================================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    min-width: 300px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background-color: #28a745;
}

.notification-error {
    background-color: #dc3545;
}

.notification-info {
    background-color: #17a2b8;
}

.notification i {
    font-size: 16px;
}
